
public class Test {
    public static void main(String[] args) {
        String str = "abcd";
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append(str);
        for (int i = 0; i < 100; i++) {
            stringBuilder.append(i);
        }
        System.out.println(stringBuilder);
    }
    public static void main11(String[] args) {
        String str = "abc";
        for (int i = 0; i < 100; i++) {
            StringBuilder stringBuilder = new StringBuilder();
            stringBuilder.append(str);
            stringBuilder.append(i);
            str = stringBuilder.toString();
        }
        System.out.println(str);
    }
    public static void main10(String[] args) {
        String str = "abc";
        for (int i = 0; i < 100; i++) {
            str += i;
        }
        System.out.println(str);
    }
    public static void main9(String[] args) {

        char[] ch = new char[]{'a','b','c'};
        String s1 = new String(ch);

        s1.intern();

        String s2 = "abc";

        System.out.println(s1 == s2);//true

    }
    public static void main8(String[] args) {
        String s1 = "abc";
        String s2 = new String("abc");
        char[] ch = new char[]{'a','b','c'};
        String s3 = new String(ch);
        String s4 = "abc";
        String s5 = new String("abc");
        System.out.println("hhhh");
    }
    public static void main7(String[] args) {


        String s1 = new String("hello");
        String s2 = new String("hello");
        System.out.println(s1 == s2);
        String s3 = "hello";
        String s4 = "hello";
        System.out.println(s3 == s4);
        System.out.println("gggg");

    }
    public static void main6(String[] args) {
        String s1 = "hello";
        String s2 = "hello";

        System.out.println(s1 == s2);
    }
    public static void main2(String[] args) {
        String s1 = new String("hello");
        String s2 = new String("hello");

        System.out.println(s1 == s2);
    }
    public static void main1(String[] args) {
       /* String s1 = "hello";
        char[] ch = new char[]{'a','b','c'};*/

        String s2 = new String("hello");

        /*String s3 = new String(ch);*/
    }
}
